package com.yl.chainStore.entity.warehouse

import com.baomidou.mybatisplus.annotation.IdType
import com.baomidou.mybatisplus.annotation.TableField
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName
import com.yl.users.common.NeedGerId
import com.yl.chainStore.common.enums.Status
import com.yl.common.annotation.NoArg
import com.yl.common.getContext
import java.util.*

/**
 * @description :技加工实体类
 * @author :吴枫
 * @create :2021-06-22 09:46:00
 */
@NoArg
@TableName("technology_processing")
data class TechnologyProcessing(

        /**
         * id
         */
        @TableId(value = "id", type = IdType.AUTO)
        var id: Long,

        /**
         * 客户id
         */
        @TableField("customer_id")
        var customerId: Long? = null,

        /**
         * 客户名称
         */
        @TableField(exist = false)
        var customerName:String?=null,

        /**
         * 关联病例id
         */
        @TableField("medical_history_id")
        var medicalHistoryId: Long? = null,

        /**
         * 名称
         */
        @TableField("name")
        var name: String? = null,

        /**
         * 内容
         */
        @TableField("content")
        var content: String? = null,

        /**
         * 加工费
         */
        @TableField("money")
        var money: Long = 0,

        /**
         * 计划时间
         */
        @TableField("plan_time")
        var planTime: Date? = null,

        /**
         * 实际完成时间
         */
        @TableField("real_time")
        var realTime: Date? = null,

        /**
         * 状态
         */
        @TableField("status")
        var status: Status = Status.WAIT_AUDIT,

        /**
         * 备注
         */
        @TableField("remark")
        var remark: String? = null,

        /**
         * 发货时间
         */
        @TableField("send_time")
        var sendTime: Date? = null,

        /**
         * 收货时间
         */
        @TableField("receipt_time")
        var receiptTime: Date? = null,

        /**
         * 公司id
         */
        @TableField("company_id")
        var companyId: Long = getContext().companyId,

        /**
         * 部门id
         */
        @TableField("dept_id")
        var deptId: Long= getContext().subCompanyId,

        /**
         * 技加工订单编号
         */
        @TableField("process_order_code")
        var processOrderCode: String? = null,

        /**
         * 取件人id
         */
        @TableField("consignee_id")
        var consigneeId: Long? = null,

        /**
         * 取件人名称
         */
        @TableField(exist = false)
        var consigneeName:String?=null,

        /**
         * 患者收费
         */
        @TableField("patients_with_charge")
        var patientsWithCharge: Long = 0,



        /**
         * 就诊时间
         */
        @TableField(exist = false)
        var seeDoctorTime:Date?=null,

        /**
         * 部门名称
         */
        @TableField(exist = false)
        var companyName: String? = null,

        /**
         * 加工厂id
         */
        @TableField("process_factory_id")
        var processFactoryId: Long ?= null,

        /**
         * 加工厂名称
         */
        @TableField(exist = false)
        var processFactoryName: String? = null,

        /**
         * 加工厂电话
         */
        @TableField(exist = false)
        var phone: String?=null,

        /**
         * 医生id
         */
        @TableField("company_user_id")
        var companyUserId: Long? = null,

        /**
         * 医生名称
         */
        @TableField(exist = false)
        var companyUserName: String? = null,

        /**
         * 技加工详情
         */
        @TableField(exist = false)
        var details: List<TechnologyProcessingDetail>? = null


)
